<template>
    <div class="player">
        <div class="song-info">player</div>    
        <div class="song-pic"></div>    
        <div class="song-control">
            <audio :src="songUrl" controls autoplay></audio>
        </div>    
     </div>
</template>

<script>
import axios from 'axios'
export default {
    data(){
        return{
            songUrl: ""
        }
    },
    created(){
        this.getData()
    },
    methods:{
        getData(){
            axios.get("/jsososo/song/urls",{
                params:{
                    id:this.$route.params.id
                }
            })
            .then(res => {
                console.log(res.data)
                this.songUrl=res.data.data[this.$route.params.id]
                // console.log(this.songUrl)
            })
            .catch(err => {
                console.error(err); 
            })
        }
    },
   
}
</script>

<style scoped>

</style>